package lu.med.praxiswahl.wahlumed.client.menustructure;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import lu.med.praxiswahl.wahlumed.client.ordonancen.OrdonancenPanel;


/**
 * 
 * @author Lars Holger Roth
 */
public class OrdonancenDropActionListener implements ActionListener
{
    private OrdonancenPanel panel;
    public static final int MODE_REZEPT = 0;
    public static final int MODE_LABOR = 1;
    public static final int MODE_UEBERWEISUNG = 2;
    private int mode;

    public OrdonancenDropActionListener(OrdonancenPanel panel, int mode)
    {
	this.panel = panel;
	this.mode = mode;
    }

    public void actionPerformed(ActionEvent e)
    {
	switch (mode)
	{
	case MODE_REZEPT:
	    panel.deleteCurrentRezept();
	    break;
	case MODE_UEBERWEISUNG:
	    panel.deleteCurrentUeberweisung();
	    break;
	case MODE_LABOR:
	    panel.deleteCurrentLabor();
	    break;
	}
    }

}
